/*
 * @Author: your name
 * @Date: 2021-04-12 00:21:10
 * @LastEditTime: 2021-12-01 14:47:10
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: /fun_android/lib/model/navigation_site.dart
 */
import 'article.dart';

class NavigationSite {
  late List<Article?> articles;
  late int cid;
  late String name;

  static NavigationSite fromMap(Map<String, dynamic> map) {
    NavigationSite naviBean = NavigationSite();
    naviBean.articles = []
      ..addAll((map['articles'] as List).map((o) => Article.fromMap(o)));
    naviBean.cid = map['cid'];
    naviBean.name = map['name'];
    return naviBean;
  }

  Map toJson() => {
        "articles": articles,
        "cid": cid,
        "name": name,
      };
}
